<html>
<head><meta charset="utf-8"><title>Sublime Text LSP config · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sublime.20Text.20LSP.20config.html">Sublime Text LSP config</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="248218487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Sublime%20Text%20LSP%20config/near/248218487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> boxdot <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sublime.20Text.20LSP.20config.html#248218487">(Aug 03 2021 at 13:14)</a>:</h4>
<p>The docs of RA usually specify configuration parameter as "rust-analyzer.checkOnSave.enable". However, for Sublime Text/LSP plugin it is not entirely clear where to put these parameters and whether these should be exploded. So, is it (1) or (2) or neither in this example?</p>
<div class="codehilite"><pre><span></span><code>{
    &quot;clients&quot;: {
        &quot;rust-analyzer&quot;: {
            &quot;command&quot;: [
                &quot;rust-analyzer&quot;
            ],
            &quot;selector&quot;: &quot;source.rust&quot;,
            &quot;enabled&quot;: true,
            &quot;initializationOptions&quot;: {
                &quot;checkOnSave&quot;: {
                    &quot;enable&quot;: true // (1)
                },
                &quot;rust-analyzer.checkOnSave.enable&quot;: true // (2)
            }
        }
    }
}
</code></pre></div>



<a name="248219408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Sublime%20Text%20LSP%20config/near/248219408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sublime.20Text.20LSP.20config.html#248219408">(Aug 03 2021 at 13:21)</a>:</h4>
<p>my guess would be (1)</p>



<a name="248219423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Sublime%20Text%20LSP%20config/near/248219423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sublime.20Text.20LSP.20config.html#248219423">(Aug 03 2021 at 13:21)</a>:</h4>
<p>can you check which one works?</p>



<a name="248219811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Sublime%20Text%20LSP%20config/near/248219811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> boxdot <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sublime.20Text.20LSP.20config.html#248219811">(Aug 03 2021 at 13:24)</a>:</h4>
<p>I am not sure how. Is there a way to fetch the options from the running server?</p>



<a name="248221943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Sublime%20Text%20LSP%20config/near/248221943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> boxdot <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sublime.20Text.20LSP.20config.html#248221943">(Aug 03 2021 at 13:41)</a>:</h4>
<p>Ok, I managed to enable logging with RA_LOG and redirect to a file. Looks like options are exploded automatically:</p>
<div class="codehilite"><pre><span></span><code>updating config from JSON: {
  &quot;checkOnSave&quot;: {
    &quot;enable&quot;: true
  },
  &quot;rust-analyzer&quot;: {
    &quot;checkOnSave&quot;: {
      &quot;enable&quot;: true
    }
  }
}
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>